package com.crr.mapper;

import com.crr.bean.Sku;
import com.crr.crud.MyBaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;


@Mapper
public interface SkuMapper extends MyBaseMapper<Sku> {
    /**
     * 批量保存 规格属性信息
     * @param spuId
     * @param skuList
     * @return
     */
    int batchSave(@Param("spuId") int spuId,@Param("skuList") List<Sku> skuList);


    /**
     * 根据商品id查询sku列表
     * @param spu_id
     * @return
     */
    List<Map> queryBySpuId(int spu_id);
}
